From dc389ae3d40e71241968d4c936be27fad8f9c29a Mon Sep 17 00:00:00 2001 From: Felix Crux Date: Fri, 18 Dec 2015 18:54:40 -0500 Subject: [PATCH] Ensure all subcommands have summary description documentation Almost all commands have info on what they are for, but a few were missing it. Also cleans up some copy/paste misdocumentation along the way. --- src/bin/git_checkout.rs | 2 ++ src/bin/locate_project.rs | 4 +++- src/bin/publish.rs | 2 +- src/bin/read_manifest.rs | 4 +++- src/bin/update.rs | 3 +-- src/bin/verify_project.rs | 2 ++ src/bin/version.rs | 2 ++ 7 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/bin/git_checkout.rs b/src/bin/git_checkout.rs index 42b6562af..82daf4587 100644 --- a/src/bin/git_checkout.rs +++ b/src/bin/git_checkout.rs @@ -12,6 +12,8 @@ struct Options { } pub const USAGE: &'static str = " +Checkout a copy of a Git repository + Usage: cargo git-checkout [options] --url=URL --reference=REF cargo git-checkout -h | --help diff --git a/src/bin/locate_project.rs b/src/bin/locate_project.rs index e9fb43454..005e60b5a 100644 --- a/src/bin/locate_project.rs +++ b/src/bin/locate_project.rs @@ -7,11 +7,13 @@ struct LocateProjectFlags { } pub const USAGE: &'static str = " +Print a JSON representation of a Cargo.toml file's location + Usage: cargo locate-project [options] Options: - --manifest-path PATH Path to the manifest to build benchmarks for + --manifest-path PATH Path to the manifest to locate -h, --help Print this message "; diff --git a/src/bin/publish.rs b/src/bin/publish.rs index fdbbd4ffc..246057cab 100644 --- a/src/bin/publish.rs +++ b/src/bin/publish.rs @@ -24,7 +24,7 @@ Options: --host HOST Host to upload the package to --token TOKEN Token to use when uploading --no-verify Don't verify package tarball before publish - --manifest-path PATH Path to the manifest to compile + --manifest-path PATH Path to the manifest of the package to publish -v, --verbose Use verbose output -q, --quiet No output printed to stdout --color WHEN Coloring: auto, always, never diff --git a/src/bin/read_manifest.rs b/src/bin/read_manifest.rs index 379310856..9e8d81e4b 100644 --- a/src/bin/read_manifest.rs +++ b/src/bin/read_manifest.rs @@ -12,6 +12,8 @@ struct Options { } pub const USAGE: &'static str = " +Print a JSON representation of a Cargo.toml manifest + Usage: cargo read-manifest [options] cargo read-manifest -h | --help @@ -19,7 +21,7 @@ Usage: Options: -h, --help Print this message -v, --verbose Use verbose output - --manifest-path PATH Path to the manifest to compile + --manifest-path PATH Path to the manifest --color WHEN Coloring: auto, always, never "; diff --git a/src/bin/update.rs b/src/bin/update.rs index 92647cfcc..00866a2a8 100644 --- a/src/bin/update.rs +++ b/src/bin/update.rs @@ -26,7 +26,7 @@ Options: -p SPEC, --package SPEC ... Package to update --aggressive Force updating all dependencies of as well --precise PRECISE Update a single dependency to exactly PRECISE - --manifest-path PATH Path to the manifest to compile + --manifest-path PATH Path to the crate's manifest -v, --verbose Use verbose output -q, --quiet No output printed to stdout --color WHEN Coloring: auto, always, never @@ -68,4 +68,3 @@ pub fn execute(options: Options, config: &Config) -> CliResult> { try!(ops::update_lockfile(&root, &update_opts)); Ok(None) } - diff --git a/src/bin/verify_project.rs b/src/bin/verify_project.rs index 962a0340f..5cbd027f3 100644 --- a/src/bin/verify_project.rs +++ b/src/bin/verify_project.rs @@ -19,6 +19,8 @@ struct Flags { } pub const USAGE: &'static str = " +Check correctness of crate manifest + Usage: cargo verify-project [options] cargo verify-project -h | --help diff --git a/src/bin/version.rs b/src/bin/version.rs index 12c954f58..87402f7cc 100644 --- a/src/bin/version.rs +++ b/src/bin/version.rs @@ -7,6 +7,8 @@ use cargo::util::{CliResult, Config}; struct Options; pub const USAGE: &'static str = " +Show version information + Usage: cargo version [options] -- 2.30.2